@echo off
set source_prefix=assets\js\bodhi
set target=production\treeAdapter.min.js
set source=production\treeAdapter.js

if exist  %target% del /f /s /q  %target%
if exist  %min% del /f /s /q  %min%

echo /*** >> %target%
echo *  >> %target%
echo  * this file should not be edited , because it is created by merge tool automatically. >> %target%
echo  * @author : Bodhi  >> %target%
echo  * @date : 2016\01\12  >> %target%
echo  * @desc : data adapter  >> %target%
echo  *  >> %target%
echo  */ >> %target%
echo;  >> %target%
echo "use strict";  >> %target%
echo;  >> %target%

copy %target% + %source_prefix%\Utils.js + %source_prefix%\Node.js + %source_prefix%\Tree.js + %source_prefix%\DataSourceTree.js + %source_prefix%\Core.js %source% /b

::uglifyjs %target% %source_prefix%\Node.js %source_prefix%\Tree.js %source_prefix%\Utils.js %source_prefix%\DataSourceTree.js %source_prefix%\Core.js -o %target%  -p 5 -c -m
uglifyjs %source% -o %target%  -p 5 -c -m